<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@page import="com.hnas.sys.service.system.dto.DTOUser"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="shortcut icon" href="${pageContext.request.contextPath }/images/HU.png" />
	<title><decorator:title/> - 海航假期后台</title>
	<link href="${pageContext.request.contextPath }/static/css/util.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath }/static/css/bootstrap-datepicker.css" rel="stylesheet">

	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery-1.10.2.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/bootstrap-datepicker.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.timepicker.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.datepair.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/util.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/basic.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.ui.datepicker-zh-CN.js"></script>
      <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/dialog.js"></script>
<script type="text/javascript">
<!--
	function updateUser() {
	$.ajax({
		url : '${pageContext.request.contextPath}/backend/user/updateme',
		type : 'POST',
		error : function(XMLHttpRequest, textStatus, errorThrown) {
			alert("更新我的信息失败");
		},
		success : function(data) {
			if(data.result == 1) {
				location.reload();
			} else {
				alert("更新失败：" + e);
			}
		}
	});
}

		
//-->
</script>
	<decorator:head/>
</head>
<body>
<%


DTOUser user = null;//com.hnas.sys.core.util.UserUtils.getCurrentUser();
String userNo = null;//user.getAccount();
try{
	 user = com.hnas.sys.core.util.UserUtils.getCurrentUser();
	 userNo = user.getAccount();
}catch(Exception ex){
	user = new DTOUser();
}
//String path = "10000" + userNo.charAt(1) + "0000";
%>
<div class="header container">
	<div class="headerbox">
		<a href="${pageContext.request.contextPath }/logout" class="right btn">退出</a>
		<!-- <a href="#" class="right btn">修改密码</a> -->
		
		<p class="right hidname"><a href="#" onclick="updateUser();return false;" style="cursor: pointer;"><img src="${pageContext.request.contextPath }/images/user_man.png" title="更新我的菜单"/></a><%=user.getName() %>，您好</p>

		<img src="${pageContext.request.contextPath }/static/images/logo.png" class="left">
		<h1 class="left">海航假期后台管理系统</h1>
	</div>
</div>

<div class="body container">
	<div class="bodybox">
		<div class="bodyleft">
			<ul class="leftnavul">
			<c:forEach items="${sessionScope.backend_menus}" var="o">
				<li class="leftnavli ${o.selected?'on':''}">
					<h2><a href="javascript:void(0);">${o.pack.name}</a></h2>
					<ul class="lnav2ul">
					<c:forEach items="${o.items}" var="o2">
						   <li ${o2.selected?'class="on"':''}><a href="${pageContext.request.contextPath }/backend/showMenu/${o2.resource.id}">${o2.resource.name}</a></li>
					</c:forEach><!--  -->
					</ul>
				</li>
			</c:forEach>				
			</ul>
		</div>
		<div class="bodyright">
			<div class="brcon01">
				<decorator:body />
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
<!--
$(function(){
	leftnav();
})
//-->
</script>
</body>
</html>